window.addEventListener("load", () => {
    let user_n = document.getElementById("user_n")
    console.log(user_n.value)
    user_n.addEventListener("input",(e)=>{
        console.log("输入框输入了",e.target.value)
    })

    let sexMale = document.getElementById("male")
    console.log(sexMale.checked)
    sexMale.checked = true
    sexMale.addEventListener("change",(e)=>{
        console.log("复选框有变动")
        console.log(sexMale.checked)
    })
    let female =document.getElementById("female")
    console.log(female.checked)
    female.addEventListener("change",(e)=>{
        console.log("复选框",e.target.checked)
        console.log(female.checked)
    })
    let fruit = document.querySelector("#fruit")
    console.log(fruit.value)
    fruit.addEventListener("change",(e)=>{
        console.log("选择了",e.target.value)
    })
})